Introduction to the Friedman test
When and why we might use Friedman
How it differs from Kruskal–Wallis
Calculating the Friedman test statistic
Ranking observations within participants
Calculating and interpreting the test statistic
Measuring effect size using Kendall's W
Follow-up comparisons
Wilcoxon signed-rank tests
Planned comparisons, post-hoc tests and multiple-comparison corrections
Summary
Friedman versus parametric within-participants ANOVA
Key distinctions between the non-parametric procedures
Both tests use ranks, but the way ranks are assigned reflects the experimental design
| Kruskal–Wallis | Friedman |
|---|---|
| Independent groups | Repeated measures |
| Different participants in each condition | Same participants in every condition |
| Rank observations across all groups | Rank observations within each participant |
| Tests differences among group distributions | Tests differences in condition rankings |
Parametric repeated-measures ANOVA models differences between condition means
Its assumptions include independence between participants, normally distributed errors and sphericity
When the data are ordinal or the assumptions of parametric analysis are poorly supported, a rank-based alternative may be useful
The Friedman test does not require normality or sphericity
The Friedman test is a non-parametric alternative to single-factor within-participants ANOVA
Appropriate for three or more related conditions
Each participant provides an observation in every condition
Observations are ranked separately within each participant
Tests whether the conditions differ systematically in their rankings
Produces a test statistic that can be evaluated using a chi-squared approximation
A psychologist investigates whether misinformation warnings improve people's ability to distinguish between true and false information on social media
Suppose each participant receives ranks of 1, 2 and 3 according to their accuracy in the three conditions
If warning condition has no systematic effect, we wouldn't expect one condition to consistently receive higher ranks than the others
However, if specific warnings improve performance, we'd expect the specific-warning condition to receive relatively high ranks across participants
The Friedman test evaluates how consistently the conditions receive different rankings
| Participant | A₁ score | A₂ score | A₃ score | A₁ rank | A₂ rank | A₃ rank |
|---|---|---|---|---|---|---|
| P1 | 35 | 48 | 74 | 1 | 2 | 3 |
| P2 | 42 | 55 | 77 | 1 | 2 | 3 |
| P3 | 38 | 49 | 79 | 1 | 2 | 3 |
| P4 | 44 | 65 | 84 | 1 | 2 | 3 |
| P5 | 70 | 68 | 90 | 2 | 1 | 3 |
Rank each participant's scores separately, from lowest (1) to highest (3)
Each participant contributes one rank to each condition
The ranks within each participant always sum to 6 (assuming three conditions, including when ties receive average ranks)
Unlike Kruskal–Wallis, we do not pool scores across participants before ranking
| Participant | A₁ rank | A₂ rank | A₃ rank |
|---|---|---|---|
| P1 | 1 | 2 | 3 |
| P2 | 1 | 2 | 3 |
| P3 | 1 | 2 | 3 |
| P4 | 1 | 2 | 3 |
| P5 | 2 | 1 | 3 |
| Sum of ranks | 6 | 9 | 15 |
\[ \frac{n(k+1)}{2}=\frac{5(4)}{2}=10 \]
If warning condition has no systematic influence, the conditions should have similar rank totals
The expected rank total for each condition is 10
Our observed rank totals are 6, 9 and 15
The specific-warning condition consistently receives the highest rank
Main question: Are the observed differences in rank totals sufficiently large to reject the null hypothesis?
Square each condition's rank total and sum across conditions
Adjusts the calculation for the number of participants and conditions
Chi-squared critical values (χ²)
| Degrees of freedom (df) | α = .10 | α = .05 | α = .01 |
|---|---|---|---|
| 1 | 2.706 | 3.841 | 6.635 |
| 2 | 4.605 | 5.991 | 9.210 |
| 3 | 6.251 | 7.815 | 11.345 |
| 4 | 7.779 | 9.488 | 13.277 |
| 5 | 9.236 | 11.070 | 15.086 |
Conclusion: The Friedman test is statistically significant, χ²(2) = 8.40, p < .05. The warning conditions differ systematically in their rankings.
Kendall's \(W\) is a measure of effect size for the Friedman test:
\[ W = \frac{8.40}{5(3 - 1)} \]
\[ W = \frac{8.40}{10} = \mathbf{0.84} \]
| Kendall's W | Interpretation |
|---|---|
| Close to 0 | Little agreement |
| Around .5 | Moderate agreement |
| Close to 1 | Strong agreement |
The Friedman test is an omnibus test: it evaluates whether conditions differ systematically in their rankings
A significant Friedman result does not identify which conditions differ
As with parametric within-participants ANOVA, we can investigate specific differences using planned comparisons or post-hoc tests
The Wilcoxon signed-rank test is a non-parametric alternative to the paired-samples t-test
Compares two related conditions using paired observations
Calculates the difference between each participant's two scores
Ranks the absolute differences, excluding zero differences
Uses the signs of the differences to assess whether there is a systematic tendency for one condition to produce higher scores
Example: We might predict that participants receiving a specific warning (A₃) will achieve higher accuracy than when receiving no warning (A₁)
Following a significant Friedman test, we may want to investigate all possible pairwise differences
Pairwise Wilcoxon signed-rank tests are a common post-hoc procedure
Each test compares scores from two related conditions
Adjustments for multiple comparisons help control the familywise error rate
As in the previous lecture, we can use Holm-adjusted p-values
The Friedman omnibus test was statistically significant:
\[ \chi^2(2)=8.40,\quad p=.015 \]
However, the pairwise Wilcoxon signed-rank tests, using exact two-sided p-values with Holm adjustment, produced the following results:
| Comparison | Adjusted p | Significant? |
|---|---|---|
| A₁ vs A₂ | .188 | No |
| A₁ vs A₃ | .188 | No |
| A₂ vs A₃ | .188 | No |
A significant omnibus test does not guarantee significant follow-up comparisons.
| Feature | Within-Participants ANOVA | Friedman |
|---|---|---|
| Design | Repeated measures | Repeated measures |
| Data analysed | Original scores | Within-participant ranks |
| Primary comparison | Condition means | Condition rankings |
| Normality | Assumes normally distributed model errors | Does not require normality |
| Sphericity | Required for the usual uncorrected F test | Not required |
| Test statistic | F | Q (χ²) |
| Effect size | Partial eta-squared | Kendall's W |
| Follow-up tests | Paired t-tests / adjusted comparisons | Wilcoxon signed-rank tests |
The Friedman test is a non-parametric alternative to single-factor within-participants ANOVA
It ranks observations within each participant, rather than across the entire dataset
The Friedman statistic assesses whether the conditions differ systematically in their rankings
Wilcoxon signed-rank tests can be used to investigate specific differences between related conditions, with appropriate adjustments for multiple comparisons